package com.xuln.framework.entity;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.EmbeddedId;
import javax.persistence.MappedSuperclass;

import org.compass.annotations.SearchableProperty;
import org.compass.annotations.Store;

/**
 * 实体类 - 基类
 */

@MappedSuperclass
public class BaseEntity implements Serializable {
	private static final long serialVersionUID = 299519402146695330L;
	@EmbeddedId
	private PrimaryKey PK;// PK
	@SearchableProperty(store = Store.YES)
	@Column(updatable = false)
	private Date createDate = new Date();// 创建日期
	@SearchableProperty(store = Store.YES)
	private Date modifyDate;// 修改日期

	public PrimaryKey getPK() {
		return PK;
	}

	public void setPK(PrimaryKey PK) {
		this.PK = PK;
	}

	public Date getCreateDate() {
		return createDate;
	}

	public void setCreateDate(Date createDate) {
		this.createDate = createDate;
	}

	public Date getModifyDate() {
		return modifyDate;
	}

	public void setModifyDate(Date modifyDate) {
		this.modifyDate = modifyDate;
	}
}